package javabook.ch06;

	interface Sungjuk_6_3_1_1 { 
		void set_hakbun(String hakbun); 
		void set_name(String name); 
	} 
	
	interface Sungjuk_6_3_1_2 { 
		void set_jumsu(int jumsu); 
	}
	
	interface Sungjuk_6_3_1 extends Sungjuk_6_3_1_1, Sungjuk_6_3_1_2 { 
		void title(); 
		void prt_data(); 
	}
	
	class Sungjuk_6_3 implements Sungjuk_6_3_1 { 
		String hakbun = " "; 
		String name = " "; 
		int jumsu = 0; 
		
		public void title() { 
			
			System.out.println("*** 인터페이스(interface) 사용 ***"); 
			System.out.println("*** 자바의 성적 출력 ***"); 
			
			System.out.println("**학번** **성명** **점수**"); 
			System.out.println("---------------------------"); 
			
		} 
		
		public void set_hakbun(String hakbun) { 
			this.hakbun = hakbun; 
		 } 
		public void set_name(String name) { 
			this.name = name;
		} 
		public void set_jumsu(int jumsu) { 
			this.jumsu = jumsu;
		} 
		public void prt_data() { 
			System.out.println(hakbun + "  " + name + " " + jumsu); 
		 } 
	}
		class Jv_6_3 extends Sungjuk_6_3 { 
			
		public static void main(String[] args) { 
			
			Sungjuk_6_3 ken_sung = new Sungjuk_6_3();
			ken_sung.set_hakbun("2060001"); 
			ken_sung.set_name("Ko Eung-Nam"); 
			ken_sung.set_jumsu(60); 
			
			Sungjuk_6_3 wife_sung = new Sungjuk_6_3(); 
			wife_sung.set_hakbun("2060002"); 
			wife_sung.set_name("Boo Chang-Mi"); 
			wife_sung.set_jumsu(80); 
			
			Sungjuk_6_3 yoo_sung = new Sungjuk_6_3(); 
			yoo_sung.set_hakbun("2060003"); 
			yoo_sung.set_name("Ko Yoo-Jin"); 
			yoo_sung.set_jumsu(100); 
			
			Sungjuk_6_3 soo_sung = new Sungjuk_6_3(); 
			soo_sung.set_hakbun("2060004"); 
			soo_sung.set_name("Ko Su-Ji"); 
			soo_sung.set_jumsu(99); 
			
			Sungjuk_6_3 ttt = new Sungjuk_6_3(); 
			ttt.title(); 
			
			ken_sung.prt_data(); 
			wife_sung.prt_data(); 
			yoo_sung.prt_data(); 
			soo_sung.prt_data(); 
		} 
	} 

